package com.ruoyi.pollution.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.pollution.mapper.BusPsCodPollutantMapper;
import com.ruoyi.pollution.domain.BusPsCodPollutant;
import com.ruoyi.pollution.service.IBusPsCodPollutantService;

/**
 * 污染物信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-18
 */
@Service
public class BusPsCodPollutantServiceImpl implements IBusPsCodPollutantService 
{
    @Autowired
    private BusPsCodPollutantMapper busPsCodPollutantMapper;

    /**
     * 查询污染物信息
     * 
     * @param pollutantcode 污染物信息主键
     * @return 污染物信息
     */
    @Override
    public BusPsCodPollutant selectBusPsCodPollutantByPollutantcode(String pollutantcode)
    {
        return busPsCodPollutantMapper.selectBusPsCodPollutantByPollutantcode(pollutantcode);
    }

    /**
     * 查询污染物信息列表
     * 
     * @param busPsCodPollutant 污染物信息
     * @return 污染物信息
     */
    @Override
    public List<BusPsCodPollutant> selectBusPsCodPollutantList(BusPsCodPollutant busPsCodPollutant)
    {
        return busPsCodPollutantMapper.selectBusPsCodPollutantList(busPsCodPollutant);
    }

    /**
     * 新增污染物信息
     * 
     * @param busPsCodPollutant 污染物信息
     * @return 结果
     */
    @Override
    public int insertBusPsCodPollutant(BusPsCodPollutant busPsCodPollutant)
    {
        return busPsCodPollutantMapper.insertBusPsCodPollutant(busPsCodPollutant);
    }

    /**
     * 修改污染物信息
     * 
     * @param busPsCodPollutant 污染物信息
     * @return 结果
     */
    @Override
    public int updateBusPsCodPollutant(BusPsCodPollutant busPsCodPollutant)
    {
        return busPsCodPollutantMapper.updateBusPsCodPollutant(busPsCodPollutant);
    }

    /**
     * 批量删除污染物信息
     * 
     * @param pollutantcodes 需要删除的污染物信息主键
     * @return 结果
     */
    @Override
    public int deleteBusPsCodPollutantByPollutantcodes(String[] pollutantcodes)
    {
        return busPsCodPollutantMapper.deleteBusPsCodPollutantByPollutantcodes(pollutantcodes);
    }

    /**
     * 删除污染物信息信息
     * 
     * @param pollutantcode 污染物信息主键
     * @return 结果
     */
    @Override
    public int deleteBusPsCodPollutantByPollutantcode(String pollutantcode)
    {
        return busPsCodPollutantMapper.deleteBusPsCodPollutantByPollutantcode(pollutantcode);
    }
}
